Skip to main content

Home/ Haskell/ Group items tagged dynamic

Rss Feed Group items tagged

Javier Neira

Bluish Coder: Dynamic Compilation and Loading of Modules in Haskell - 0 views

  •  
    The Haskell system GHC has libraries that provide the ability to compile Haskell code and dynamically load it into a running Haskell program. A library that provides this functionality is hs-plugins. Unfortunately hs-plugins doesn't work with the latest GHC release, 6.10.1.
Javier Neira

What is (functional) reactive programming? - Stack Overflow - 0 views

  • Semantically, FRP's concurrency is fine-grained, determinate, and continuous.
  • Dynamic/evolving values (i.e., values "over time") are first class values in themselves. You can define them and combine them, pass them into & out of functions. I called these things "behaviors".
  • Each occurrence has an associated time and value.
  • ...3 more annotations...
  • In software design, I always ask the same question: "what does it mean?".
  • It's been quite a challenge to implement this model correctly and efficiently, but that's another story.
  • The basic idea behind reactive programming is that there are certain datatypes that represent a value "over time". Computations that involve these changing-over-time values will themselves have values that change over time.
Javier Neira

Existential type - HaskellWiki - 0 views

  • First of all, it is now impossible for a function to demand a Worker having a specific type of buffer. Second, the type of foo can now be derived automatically without needing an explicit type signature. (No monomorphism restriction.) Thirdly, since code now has no idea what type the buffer function returns, you are more limited in what you can do to it.
  • This illustrates creating a heterogeneous list, all of whose members implement "Show", and progressing through that list to show these items: data Obj = forall a. (Show a) => Obj a   xs :: [Obj] xs = [Obj 1, Obj "foo", Obj 'c']   doShow :: [Obj] -> String doShow [] = "" doShow ((Obj x):xs) = show x ++ doShow xs With output: doShow xs ==> "1\"foo\"'c'"
  • Existential types in conjunction with type classes can be used to emulate the dynamic dispatch mechanism of object oriented programming languages. To illustrate this concept I show how a classic example from object oriented programming can be encoded in Haskell.
1 - 3 of 3
Showing 20 items per page