What is the best way to rewrite the following so it compiles? Both data-type depends on each other.
{-# LANGUAGE OverloadedStrings, DuplicateRecordFields #-}
data Syn = S { inputs :: [Neu] }
data Neu = N { weigth :: Double, inputs :: [ Syn ] }
What is the best way to rewrite the following so it compiles? Both data-type depends on each other.
{-# LANGUAGE OverloadedStrings, DuplicateRecordFields #-}
data Syn = S { inputs :: [Neu] }
data Neu = N { weigth :: Double, inputs :: [ Syn ] }
Your code compiles fine (I took the liberty of giving it a module name), there are not errors:
If you are getting an error please be sure to post the actual code, the command used to compile or interpret, the version of the compiler, and the error message itself.