Hi All,
Does anybody has the experience to built an interpreter on top of GHCi?
What I want is to defined a my own interpreter as a Haskell module and
load it into GHCi. So this new interpreter will be running on top of GHCi
which accepts syntax extension of Haskell. For example:
Prelude> :l myI
Hi All,
Does anybody know what parser "Typing Haskell in Haskell" use? I am tring
to use the code for some type checking. But I cannot find a parser in the
distribution.
-W-M-
@ @
|
\_/
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.hask
Hi All,
Anybody knows why the following code does not work?
> class Foo n
> data Erk n = Foo n => Erk
test.hs:53:
All of the type variables in the constraint `Foo n' are already in
scope
(at least one must be universally quantified here)
When checking the existential context of
Hi All,
Anybody has the experience of importing a module from a different
directory?In my code, i need to import a module that is not in the current
directory. How can I do that in GHC?
-W-M-
@ @
|
\_/
___
Haskell mailing list
[EMAIL PROTECTED
I admire the elegancy of your code which makes the changes to add new data
types minimum. There is one question I want to ask: Does this technique
extend to polymophic types?
Let's say we have the following type:
> data D a = C | D a
Is it possible to index the type D a? Or there is some fundmen
Hi All,
I am trying to perform dynamic casting on polymorphic types.
Let's say I have a data type like:
> data Foo a = Foo a
Is there any way to use dynamics to convert a value of type Foo a to a
type reprentation? I try to use the toDyn in the dynamic libray, it
complains for ambigours a. Is th
Hi All,
Any one of your have the experience of defining a state of a state monad
as a polymorphic type?
I want to have:
> type State = Term a => [a]
> data M a = M (State -> IO(State,a))
GHC yields a error message "Illegal polymorphic type".
How to resolve this?
Thank you very much.
-W-M-
Hi All,
I have a data type defined as
> data D a = D1 Int | D2 a
Follow this definition, I have D2 Int,D2 Bool and D2 [D2 Int] as instances
of type D.
I want to write an overloaded function lift which lifts an atom type to D.
It is easily done for D2 Int and D2 Bool using type classes.I can h
Try
intToFloat :: Int -> Float
intToFloat n = fromInteger (toInteger n)
-W-M-
@ @
|
\_/
On Fri, 28 Feb 2003, Mike T. Machenry wrote:
> Hello,
>
> I am having a problem. I recently desided I wanted a bunch function to return
> float instead of Int. I changed their type and wro
I understand that existentially bound types cannot escape.
For example, say we have
data Foo = forall a. Foo Int a
Then we cannot define a function
extract (Foo i a) = a
However,this limitation makes it extremly difficult to program with local
quantifications.Is there any way to by pass this?
10 matches
Mail list logo